package cd.cdyb.sms.service.impl;

import cd.cdyb.sms.dao.OssConfigDao;
import cd.cdyb.sms.domain.OssConfig;
import cd.cdyb.sms.service.OssConfigService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: lilin
 * @CreateTime: 2024-05-14  10:21
 * @Description: oss
 */
@Service
public class OssConfigServiceImpl implements OssConfigService {

    @Resource
    private OssConfigDao ossConfigDao;

    @Override
    public OssConfig getByAccountId(Integer accountId) {
        LambdaQueryWrapper<OssConfig> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(OssConfig::getAccountId, accountId);
        return ossConfigDao.selectOne(wrapper);
    }
}
